local cjson     = require "cjson"
local global    = require "global"
local redis     = require "redis"
local genid     = require "genid"

local _M={}

function _M.putqueue(roomid,c,m,data)
    local r = redis:new(global.get_redis_queue_conf())
    local queuename= string.format("%s:liveroom:queue", global.get_appname());
    local cmd={
                c=c,
                m=m,
                tp='queue',
                uuid=genid.gen(),
                roomid=roomid,
                data=data,
            }
    r:lpush(queuename,cjson.encode(cmd));
end

return _M